< previous page page_639 next page >

Page 639
(table continued from previous page)
ColumnDescriptionRelated Profile Type
the entire application
LineTextThe line of executable code from the functionLine Timing, Line Hit Count

The types of analysis you decide to perform depend entirely on your needs. The Code Profiler performs two primary types of testing:
Code coverage is a process of discovering whether a particular function or line of code has run. The two hit count profile types (Line Hit Count and Function Hit Count) are useful in determining whether a particular function or line of code executed. You might find that certain code in your application is never executed.
Code optimization is a process that determines which functions or lines of code are run most often or take the most time to execute. The two timing profile types (Line Timing and Function Timing) are useful in determining how long it takes a particular function or line of code to execute, as well as how often it's run.
Tip
To have effective testing, I recommend that you create a script to follow when profiling your application, rather than test it at random. Following a script ensures that your application gets a complete and uniform test.

The Hits column contains the total number of times a function or code line was executed. If this number is zero, you should investigate why; if the code is really never used, delete it from your application. When trying to optimize your application, you should find the values in the TotalTime, AvgTime, and PctTime columns very useful. Also, a very high Hits value for a particular function or code line can mean that you have a recursive routine or a possible design problem. The Code Profiler helps you to uncover these issues.
Caution
If you determine that you need to make changes after profiling your code, be sure to make the changes in your original code files, not in your working copies (the file copies that have profiler code embedded in them). If you change the working copy of a form or module, those changes will be discarded and lost after you click the Remove Profiler Code button.

 
< previous page page_639 next page >

If you like this book, buy it!